using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.SceneManagement;

public class StartGameButton : MonoBehaviour
{
    public GameObject startPanel;//遮罩
    public Slider slider;//加载条
    public GameObject button;
    // float cont = 0.01;
    // Start is called before the first frame update
    void Start()
    {

        
    }

    // Update is called once per frame
    void Update()
    {
        changefill();
        Debug.Log("111---" + slider.value);
    }
    public void findPanel(){
        button.SetActive(false);
        startPanel.SetActive(true);
    }
    public void changefill(){
        slider.value += 0.01f;
        if (slider.value >= 1)
        {
            SceneManager.LoadScene("MainGame");
        }
    }
}
